# imports
import act
import numpy as np
import xarray as xr
import matplotlib.pyplot as plt
import pyart
from datetime import timedelta
import cmweather
import pandas as pd
import glob
from bokeh.models.formatters import DatetimeTickFormatter
import hvplot.xarray
import holoviews as hv
hv.extension("bokeh")
## You are using the Python ARM Radar Toolkit (Py-ART), an open source
## library for working with weather radar data. Py-ART is partly
## supported by the U.S. Department of Energy as part of the Atmospheric
## Radiation Measurement (ARM) Climate Research Facility, an Office of
## Science user facility.
##
## If you use this software to prepare a publication, please cite:
##
## JJ Helmus and SM Collis, JORS 2016, doi: 10.5334/jors.119
ERROR 1: PROJ: proj_create_from_database: Open of /opt/conda/share/proj failed
# Set your username and token here!
username = 'jeissner'
token = '196301151e10a63'
# COMBLE ARSCL datastream
datastream = 'anxarsclkazr1kolliasM1.c1'
startdate = '2020-03-01'
enddate = '2020-03-31'
# Read in data
result = act.discovery.download_arm_data(username, token, datastream, startdate, enddate)
ds_arscl = act.io.read_arm_netcdf(result)
ds_arscl
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200305.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200304.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200306.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200307.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200328.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200301.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200302.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200303.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200324.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200326.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200309.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200321.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200320.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200323.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200318.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200331.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200319.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200313.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200329.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200325.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200327.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200308.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200322.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200330.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200311.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200310.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200312.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200315.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200317.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200316.000000.nc
[DOWNLOADING] anxarsclkazr1kolliasM1.c1.20200314.000000.nc
If you use these data to prepare a publication, please cite:
Johnson, K., Jensen, M., & Giangrande, S. Active Remote Sensing of CLouds
(ARSCL) product using Ka-band ARM Zenith Radars (ARSCLKAZR1KOLLIAS). Atmospheric
Radiation Measurement (ARM) User Facility. https://doi.org/10.5439/1228768
<xarray.Dataset> Size: 34GB
Dimensions: (time: 669600, height: 596,
layer: 10, radar_mode: 4)
Coordinates:
* time (time) datetime64[ns] 5MB 2020-03-0...
* layer (layer) int32 40B 0 1 2 3 4 5 6 7 8 9
* height (height) float32 2kB 160.0 ... 1.80...
* radar_mode (radar_mode) |S2 8B b'hi' ... b'pr'
Data variables: (12/33)
base_time (time) datetime64[ns] 5MB 2020-03-0...
time_offset (time) datetime64[ns] 5MB 2020-03-0...
reflectivity_best_estimate (time, height) float32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
qc_reflectivity_best_estimate (time, height) int32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
reflectivity (time, height) float32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
qc_reflectivity (time, height) int32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
... ...
minimum_detectable_reflectivity_flag (time, height) float32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
reflectivity_saturation_flag (time, height) float32 2GB dask.array<chunksize=(901, 596), meta=np.ndarray>
instrument_availability_flag (time) int16 1MB dask.array<chunksize=(900,), meta=np.ndarray>
lat (time) float32 3MB 69.14 ... 69.14
lon (time) float32 3MB 15.68 ... 15.68
alt (time) float32 3MB 2.0 2.0 ... 2.0 2.0
Attributes: (12/22)
command_line: idl -R -n kazrcfrarscl -n kazrcfrarsclc...
Conventions: ARM-1.2
process_version: vap-kazrcfrarscl-1.6-4.el7
dod_version: arsclkazr1kollias-c1-4.0
site_id: anx
platform_id: arsclkazr1kollias
... ...
doi: 10.5439/1228768
history: created by user malynn on machine node1...
_file_dates: ['20200301', '20200302', '20200303', '2...
_file_times: ['000000', '000000', '000000', '000000'...
_datastream: anxarsclkazr1kolliasM1.c1
_arm_standards_flag: 1%store -r
time_s[0]
vdates = []
for time in time_s:
time = str(time)
dates = time[0:10]
vdates.append(dates)
ds2 = ds_arscl.sel(time=slice(dates))
ref = ds2.reflectivity_best_estimate
ref_lowest_5000m = ref.sel(height=slice(0., 5000))
ref_lowest_5000m.plot(x='time',y='height',
cmap='ChaseSpectral',
vmin=-40,
vmax=20)
plt.show()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[9], line 12
10 ref = ds2.reflectivity_best_estimate
11 ref_lowest_5000m = ref.sel(height=slice(0., 5000))
---> 12 ref_lowest_5000m.plot(x='time',y='height',
13 cmap='ChaseSpectral',
14 vmin=-40,
15 vmax=20)
16 plt.show()
File /opt/conda/lib/python3.11/site-packages/xarray/plot/accessor.py:48, in DataArrayPlotAccessor.__call__(self, **kwargs)
46 @functools.wraps(dataarray_plot.plot, assigned=("__doc__", "__annotations__"))
47 def __call__(self, **kwargs) -> Any:
---> 48 return dataarray_plot.plot(self._da, **kwargs)
File /opt/conda/lib/python3.11/site-packages/xarray/plot/dataarray_plot.py:282, in plot(darray, row, col, col_wrap, ax, hue, subplot_kws, **kwargs)
279 plotfunc: Callable
281 if ndims == 0 or darray.size == 0:
--> 282 raise TypeError("No numeric data to plot.")
283 if ndims in (1, 2):
284 if row or col:
TypeError: No numeric data to plot.
ds2
<xarray.Dataset> Size: 2kB
Dimensions: (time: 0, height: 596, layer: 10,
radar_mode: 4)
Coordinates:
* time (time) datetime64[ns] 0B
* layer (layer) int32 40B 0 1 2 3 4 5 6 7 8 9
* height (height) float32 2kB 160.0 ... 1.80...
* radar_mode (radar_mode) |S2 8B b'hi' ... b'pr'
Data variables: (12/33)
base_time (time) datetime64[ns] 0B
time_offset (time) datetime64[ns] 0B
reflectivity_best_estimate (time, height) float32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
qc_reflectivity_best_estimate (time, height) int32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
reflectivity (time, height) float32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
qc_reflectivity (time, height) int32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
... ...
minimum_detectable_reflectivity_flag (time, height) float32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
reflectivity_saturation_flag (time, height) float32 0B dask.array<chunksize=(0, 596), meta=np.ndarray>
instrument_availability_flag (time) int16 0B dask.array<chunksize=(0,), meta=np.ndarray>
lat (time) float32 0B
lon (time) float32 0B
alt (time) float32 0B
Attributes: (12/22)
command_line: idl -R -n kazrcfrarscl -n kazrcfrarsclc...
Conventions: ARM-1.2
process_version: vap-kazrcfrarscl-1.6-4.el7
dod_version: arsclkazr1kollias-c1-4.0
site_id: anx
platform_id: arsclkazr1kollias
... ...
doi: 10.5439/1228768
history: created by user malynn on machine node1...
_file_dates: ['20200301', '20200302', '20200303', '2...
_file_times: ['000000', '000000', '000000', '000000'...
_datastream: anxarsclkazr1kolliasM1.c1
_arm_standards_flag: 1# plot reflectivity
variable='reflectivity'
#variable='reflectivity_best_estimate'
# Let's filter out test 5 using ACT. Yes, it's that simple!
ds_arscl.qcfilter.datafilter(variable, rm_tests=[1, 2], del_qc_var=False)
# There are other ways we can filter data out as well. Using the
# rm_assessments will filter out by all Bad/Suspect tests that are failing
# ds.qcfilter.datafilter(variable, rm_assessments=['Bad', 'Suspect'], del_qc_var=False)
# Let's check out the attributes of the variable
# Whenever data are filtered out using the datafilter function
# a comment will be added to the variable history for provenance purposes
#print(ds_arscl[variable].attrs)
# And plot it all again!
# Create a plotting display object with 2 plots
display = act.plotting.TimeSeriesDisplay(ds_arscl, figsize=(15, 10), subplot_shape=(2,))
# Plot up the variable in the first plot
#display.plot(variable, subplot_index=(0,))
ref = ds_arscl.reflectivity_best_estimate
vel = ds_arscl.mean_doppler_velocity
ref_lowest_5000m = ref.sel(height=slice(0., 5000))
vel_lowest_5000m = vel.sel(height=slice(0., 5000))
ref_lowest_5000m.plot(x='time',y='height',
cmap='ChaseSpectral',
vmin=-40,
vmax=20)
vel_lowest_5000m.plot(x='time',y='height',
cmap='seismic',
vmin=-40,
vmax=20)
#ref_lowest_5000m.hvplot(x='time',
# y='height',
# cmap='ChaseSpectral',
# clim=(-40, 20),
# rasterize=True)
# Plot cloud base height
#display.plot('cloud_base_best_estimate', subplot_index=(0,))
# Plot velocities
#display.plot('mean_doppler_velocity', subplot_index=(1,))
plt.show()
formatter = DatetimeTickFormatter(hours="%d %b %Y \n %H:%M UTC")
reflectivity_plot = ds_arscl.reflectivity.sel(height=slice(0, 7000)).hvplot(x='time', y='height', cmap='Spectral_r', xformatter=formatter, clim=(-40, 20), rasterize=True, clabel='Reflectivity (dBZ)')
velocity_plot = ds_arscl.mean_doppler_velocity.sel(height=slice(0, 7000)).hvplot(x='time', y='height', cmap='seismic', xformatter=formatter, clim=(-5, 5), rasterize=True, clabel='Mean Doppler Velocity (m/s)')
reflectivity_plot + velocity_plot
# NSA datastream
datastream = 'nsaarsclkazr1kolliasC1.c0'
startdate = '2016-11-05'
enddate = '2016-11-06'
# Read in data
result = act.discovery.download_arm_data(username, token, datastream, startdate, enddate)
ds_arscl_nsa = act.io.read_arm_netcdf(result)
ds_arscl_nsa
[DOWNLOADING] nsaarsclkazr1kolliasC1.c0.20161106.000000.nc
[DOWNLOADING] nsaarsclkazr1kolliasC1.c0.20161105.000000.nc
If you use these data to prepare a publication, please cite:
Johnson, K., Giangrande, S., & Toto, T. Active Remote Sensing of CLouds (ARSCL)
product using Ka-band ARM Zenith Radars (ARSCLKAZR1KOLLIAS). Atmospheric
Radiation Measurement (ARM) User Facility. https://doi.org/10.5439/1393437
<xarray.Dataset> Size: 2GB
Dimensions: (time: 43200, height: 596, layer: 10,
radar_mode: 4)
Coordinates:
* time (time) datetime64[ns] 346kB 2016-11...
* layer (layer) int32 40B 0 1 2 3 4 5 6 7 8 9
* height (height) float32 2kB 160.0 ... 1.80...
* radar_mode (radar_mode) |S2 8B b'hi' ... b'pr'
Data variables: (12/33)
base_time (time) datetime64[ns] 346kB 2016-11...
time_offset (time) datetime64[ns] 346kB 2016-11...
reflectivity_best_estimate (time, height) float32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
qc_reflectivity_best_estimate (time, height) int32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
reflectivity (time, height) float32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
qc_reflectivity (time, height) int32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
... ...
minimum_detectable_reflectivity_flag (time, height) float32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
reflectivity_saturation_flag (time, height) float32 103MB dask.array<chunksize=(901, 596), meta=np.ndarray>
instrument_availability_flag (time) int16 86kB dask.array<chunksize=(1,), meta=np.ndarray>
lat (time) float32 173kB 71.32 ... 71.32
lon (time) float32 173kB -156.6 ... -156.6
alt (time) float32 173kB 8.0 8.0 ... 8.0
Attributes: (12/23)
command_line: idl -R -n kazrarsclc0 -s nsa -f C1 -b 2...
Conventions: ARM-1.2
process_version: vap-kazrarscl-1.0.0-devel
dod_version: arsclkazr1kollias-c0-1.0
site_id: nsa
platform_id: arsclkazr1kollias
... ...
doi: 10.5439/1393437
history: created by user ttoto on machine talc.d...
_file_dates: ['20161105', '20161106']
_file_times: ['000000', '000000']
_datastream: nsaarsclkazr1kolliasC1.c0
_arm_standards_flag: 1reflectivity_plot = ds_arscl_nsa.reflectivity.sel(height=slice(0, 3000)).hvplot(x='time', y='height', cmap='Spectral_r', xformatter=formatter, clim=(-40, 20), rasterize=True, clabel='Reflectivity (dBZ)')
velocity_plot = ds_arscl_nsa.mean_doppler_velocity.sel(height=slice(0, 3000)).hvplot(x='time', y='height', cmap='seismic', xformatter=formatter, clim=(-5, 5), rasterize=True, clabel='Mean Doppler Velocity (m/s)')
specwidth_plot = ds_arscl_nsa.spectral_width.sel(height=slice(0, 3000)).hvplot(x='time', y='height', cmap='seismic', xformatter=formatter, clim=(-1, 1), rasterize=True, clabel='Spectral Width (m/s)')
reflectivity_plot + velocity_plot + specwidth_plot
# COMBLE PBL heights
datastream = 'anxpblhtsonde1mcfarlM1.c1'
datastream2 = 'nsapblhtsonde1mcfarlC1.c1'
startdate = '2020-03-01'
enddate = '2020-03-31'
startdate2 = '2016-11-05'
enddate2 = '2016-11-06'
# Read in data
result = act.discovery.download_arm_data(username, token, datastream, startdate, enddate)
result2 = act.discovery.download_arm_data(username, token, datastream2, startdate2, enddate2)
ds_pbl_comble = act.io.read_arm_netcdf(result)
ds_pbl_nsa = act.io.read_arm_netcdf(result2)
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200311.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200312.172800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200321.232600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200305.052800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200330.052500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200313.232200.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200325.172400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200314.053000.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200322.053100.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200306.172900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200305.172300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200326.232600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200315.112300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200315.172700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200313.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200301.112300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200321.172900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200329.172800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200314.173400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200328.232200.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200304.172800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200319.112100.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200311.234900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200303.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200310.172400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200326.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200327.232900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200326.052600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200303.112600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200314.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200317.172700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200310.232700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200309.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200320.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200329.053400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200329.232800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200309.173000.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200307.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200301.172900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200327.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200316.054100.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200323.112500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200302.172500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200305.232500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200325.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200319.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200318.232700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200320.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200319.172200.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200318.112500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200304.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200308.052800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200309.232800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200330.112500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200305.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200318.173100.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200310.053200.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200329.112300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200320.053000.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200330.172600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200313.112600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200312.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200325.053300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200306.052800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200322.173000.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200322.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200308.172900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200327.112300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200327.172700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200317.112600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200328.112300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200324.052800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200304.052900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200321.112600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200314.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200318.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200319.232800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200320.054500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200307.232600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200328.172600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200322.232700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200311.112200.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200303.053600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200312.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200323.173500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200330.233500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200321.052600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200320.174700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200325.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200307.172900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200326.172400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200328.053500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200315.052900.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200313.172600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200310.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200324.112600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200308.232700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200302.052300.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200303.172500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200311.174700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200324.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200307.052500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200306.232500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200302.112400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200323.052800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200316.232600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200324.172400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200317.052600.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200317.232500.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200306.112700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200316.172800.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200304.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200301.052700.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200301.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200315.232400.cdf
[DOWNLOADING] anxpblhtsonde1mcfarlM1.c1.20200323.232300.cdf
If you use these data to prepare a publication, please cite:
Zhang, D., & Zhang, D. Planetary Boundary Layer Height (PBLHTSONDE1MCFARL).
Atmospheric Radiation Measurement (ARM) User Facility.
https://doi.org/10.5439/1991783
[DOWNLOADING] nsapblhtsonde1mcfarlC1.c1.20161105.173000.cdf
[DOWNLOADING] nsapblhtsonde1mcfarlC1.c1.20161105.053000.cdf
If you use these data to prepare a publication, please cite:
Riihimaki, L., Riihimaki, L., Zhang, D., & Zhang, D. Planetary Boundary Layer
Height (PBLHTSONDE1MCFARL). Atmospheric Radiation Measurement (ARM) User
Facility. https://doi.org/10.5439/1991783
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[93], line 15
12 result = act.discovery.download_arm_data(username, token, datastream, startdate, enddate)
13 result2 = act.discovery.download_arm_data(username, token, datastream2, startdate2, enddate2)
---> 15 ds_pbl_comble = act.io.read_arm_netcdf(result)
16 ds_pbl_nsa = act.io.read_arm_netcdf(result2)
File /opt/conda/lib/python3.11/site-packages/act/io/arm.py:172, in read_arm_netcdf(filenames, concat_dim, return_None, combine, decode_times, use_cftime, use_base_time, combine_attrs, cleanup_qc, keep_variables, **kwargs)
168 ds = xr.open_mfdataset(filenames, **kwargs)
170 else:
171 # When all else fails raise the orginal exception
--> 172 raise exception
174 # If requested use base_time and time_offset to derive time. Assumes that the units
175 # of both are in seconds and that the value is number of seconds since epoch.
176 if use_base_time:
File /opt/conda/lib/python3.11/site-packages/act/io/arm.py:147, in read_arm_netcdf(filenames, concat_dim, return_None, combine, decode_times, use_cftime, use_base_time, combine_attrs, cleanup_qc, keep_variables, **kwargs)
143 except_tuple = except_tuple + (FileNotFoundError, OSError)
145 try:
146 # Read data file with Xarray function
--> 147 ds = xr.open_mfdataset(filenames, **kwargs)
149 except except_tuple as exception:
150 # If requested return None for File not found error
151 if type(exception).__name__ == 'FileNotFoundError':
File /opt/conda/lib/python3.11/site-packages/xarray/backends/api.py:1082, in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, data_vars, coords, combine, parallel, join, attrs_file, combine_attrs, **kwargs)
1069 combined = _nested_combine(
1070 datasets,
1071 concat_dims=concat_dim,
(...)
1077 combine_attrs=combine_attrs,
1078 )
1079 elif combine == "by_coords":
1080 # Redo ordering from coordinates, ignoring how they were ordered
1081 # previously
-> 1082 combined = combine_by_coords(
1083 datasets,
1084 compat=compat,
1085 data_vars=data_vars,
1086 coords=coords,
1087 join=join,
1088 combine_attrs=combine_attrs,
1089 )
1090 else:
1091 raise ValueError(
1092 f"{combine} is an invalid option for the keyword argument"
1093 " ``combine``"
1094 )
File /opt/conda/lib/python3.11/site-packages/xarray/core/combine.py:958, in combine_by_coords(data_objects, compat, data_vars, coords, fill_value, join, combine_attrs)
954 grouped_by_vars = itertools.groupby(sorted_datasets, key=vars_as_keys)
956 # Perform the multidimensional combine on each group of data variables
957 # before merging back together
--> 958 concatenated_grouped_by_data_vars = tuple(
959 _combine_single_variable_hypercube(
960 tuple(datasets_with_same_vars),
961 fill_value=fill_value,
962 data_vars=data_vars,
963 coords=coords,
964 compat=compat,
965 join=join,
966 combine_attrs=combine_attrs,
967 )
968 for vars, datasets_with_same_vars in grouped_by_vars
969 )
971 return merge(
972 concatenated_grouped_by_data_vars,
973 compat=compat,
(...)
976 combine_attrs=combine_attrs,
977 )
File /opt/conda/lib/python3.11/site-packages/xarray/core/combine.py:959, in <genexpr>(.0)
954 grouped_by_vars = itertools.groupby(sorted_datasets, key=vars_as_keys)
956 # Perform the multidimensional combine on each group of data variables
957 # before merging back together
958 concatenated_grouped_by_data_vars = tuple(
--> 959 _combine_single_variable_hypercube(
960 tuple(datasets_with_same_vars),
961 fill_value=fill_value,
962 data_vars=data_vars,
963 coords=coords,
964 compat=compat,
965 join=join,
966 combine_attrs=combine_attrs,
967 )
968 for vars, datasets_with_same_vars in grouped_by_vars
969 )
971 return merge(
972 concatenated_grouped_by_data_vars,
973 compat=compat,
(...)
976 combine_attrs=combine_attrs,
977 )
File /opt/conda/lib/python3.11/site-packages/xarray/core/combine.py:619, in _combine_single_variable_hypercube(datasets, fill_value, data_vars, coords, compat, join, combine_attrs)
613 if len(datasets) == 0:
614 raise ValueError(
615 "At least one Dataset is required to resolve variable names "
616 "for combined hypercube."
617 )
--> 619 combined_ids, concat_dims = _infer_concat_order_from_coords(list(datasets))
621 if fill_value is None:
622 # check that datasets form complete hypercube
623 _check_shape_tile_ids(combined_ids)
File /opt/conda/lib/python3.11/site-packages/xarray/core/combine.py:111, in _infer_concat_order_from_coords(datasets)
109 ascending = False
110 else:
--> 111 raise ValueError(
112 f"Coordinate variable {dim} is neither "
113 "monotonically increasing nor "
114 "monotonically decreasing on all datasets"
115 )
117 # Assume that any two datasets whose coord along dim starts
118 # with the same value have the same coord values throughout.
119 if any(index.size == 0 for index in indexes):
ValueError: Coordinate variable height_ss is neither monotonically increasing nor monotonically decreasing on all datasets
ds_pbl_nsa
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[94], line 1
----> 1 ds_pbl_nsa
NameError: name 'ds_pbl_nsa' is not defined